﻿@{
    ViewBag.Title = "Modificar";
}

<h2>Modificar</h2>

<form action="/Garbarino/Modificar" method = "post">
 <input type="hidden" name="pos" value="@ViewBag.pos" />
 @{
     String[] names = Enum.GetNames(typeof(Garbarino.Controllers.CategoriaEnum));    
  }

  <label>
  <span>Categoria</span>
  <select name="Categoria">
    @for (int i = 0; i < names.Length; i++)
    {
        var s = names[i];
       
         if (i == (int)Model._categoria)
          {
            <option value="@i" selected="selected">@s</option> 
          }
          else
         {
              <option value="@i">@s</option>          
        }
    }
    </select>
</label>
    <br />
    

    <label>
      <span>Producto</span>
      <input type="text" name="nombre" value="@Model._nombre"/>
    </label>
    <br />
    <label>
      <span>Cantidad</span>
      <input type="number" name="cantidad" value="@Model._cantidad"/>
    </label>
    <br />
     <label>
      <span>Precio</span>
      <input type="text" name="precio" value="@Model._precio"/>
    </label>
    <br />
    <input type="submit" />
  </form>
</form>
